"""mgproject URL Configuration

The `urlpatterns` list routes URLs to view. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function view
    1. Add an import:  from my_app import view
    2. Add a URL to urlpatterns:  path('', view.home, name='home')
Class-based view
    1. Add an import:  from other_app.view import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,re_path,include

urlpatterns = [
    path('admin/', admin.site.urls),
    # path('',view.IndexView.as_view()),
    re_path('^', include(('newsapp.urls', 'newsapp'), namespace='newsapp')),# namespace逆向解析 第一个为元组,第一个参数是路径，第二个为app名称  首页模块路由
    re_path('^',include('userapp.urls')),  # ^正则表达式  用户模块路由
    re_path('^', include(('verifications.urls', 'verifications'), namespace='verifications')),  # namespace逆向解析 第一个为元组,第一个参数是路径，第二个为app名称  首页模块路由
    re_path('^',include('oauth.urls')),
    re_path(r'^search/',include('haystack.urls')),
    re_path('^',include('payment.urls')),
    re_path(r'^',include('mg_admin.urls')),
]
